import request from "@/until/axios";
// import axios from "@/until/axios";
import park from "./park";

export const parkview = () =>
    request({
        method: "get",
        url: park.park.parkview,

    });
export const parkdetail = (params) =>
    request({
        method: "get",
        url: park.park.parkdetail + "/" + params.id,
        params
    });
export const addcar = data =>
    request({
        method: "post",
        url: park.park.addcar,
        data,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const carinformation = () =>
    request({
        method: "get",
        url: park.park.carinformation,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const addcarinformation = () =>
    request({
        method: "post",
        url: park.park.addcarinformation,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
export const parksearch = (params) =>
    request({
        method: "get",
        url: park.park.parksearch,
        params,
        headers: {
            "Authorization": window.localStorage.getItem("token")
        }
    });
